package com.ruoyi.finance.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/** 付款主表：PaymentMaster，付款明细表： PaymentVoucher*/
@Data
@TableName(value="tb_payment_master")
public class PaymentMaster {

    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value = "payment_master_id")
    private String paymentMasterId;

    /** 付款单号*/
    @TableField("payment_master_code")
    private String paymentMasterCode;

    /** 供应商ID（关联：tb_vendor）*/
    @TableField("vendor_id")
    private String vendorId;

    /** 货币ID（关联tb_monetary）*/
    @TableField("monetary_id")
    private String monetaryId;

    /** 付款单状态：0未核准，1部分核准，2未过账，3部分过账，4已过账，5驳回，6锁定中*/
    @TableField("payment_master_status")
    private String paymentMasterStatus;

    /** 付款金额*/
    @TableField("amount_due")
    private BigDecimal amountDue;

    /** 创建人*/
    @TableField("create_by")
    private String createBy;

    /** 创建时间*/
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public PaymentMaster (){}
    public PaymentMaster(String paymentMasterId, String paymentMasterCode, String vendorId, String monetaryId, String createBy, Date createTime) {
        this.paymentMasterId = paymentMasterId;
        this.paymentMasterCode = paymentMasterCode;
        this.vendorId = vendorId;
        this.monetaryId = monetaryId;
        this.createBy = createBy;
        this.createTime = createTime;
    }
}
